package ru.maksb.exchange.service;

import ru.maksb.exchange.domain.Order;
import ru.maksb.exchange.domain.request.NewOrderRequest;

public class OrderFactory {

    public static Order createOrder(NewOrderRequest request) {
        Order order = new Order(request.getClientId(), 
                request.getReferenceId(), 
                request.getTicket(), 
                request.getType(), 
                request.getSide(), 
                request.getAmount(),
                request.getPrice());
        return order;
    }

}
